package com.beikbank.job;

import com.beikbank.dao.BKUserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by wangzhanjin on 2018/1/17.
 */

@Component
@EnableScheduling
public class OnlineCheckJob {

    @Autowired
    private BKUserDao bkUserDao;

    /**
     * 用户在线量统计定时任务
     */
    @Scheduled(cron = "0 55 23 * * *")
//    @Scheduled(cron = "0/20 * * * * *")
    private void onlineCheckJob(){
        try {
            bkUserDao.onlineCheckJob();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
